<template>
        <el-dialog
            title="提示"
            :visible.sync="showaddrole"
            width="40%"
            :before-close="handleClose">
            <div>
                <table>
                    <tr>
                        <td>角色名称</td>
                        <td>
                            <el-input placeholder="请输入内容"></el-input>
                        </td>
                    </tr>
                    <tr>
                        <td>角色描述</td>
                        <td>
                            <el-input placeholder="请输入内容"></el-input>
                        </td>
                    </tr>
                </table>
            </div>
            <span slot="footer" class="dialog-footer">
                <el-button @click="handleClose">取 消</el-button>
                <el-button type="primary" @click="handleClose">确 定</el-button>
            </span>
            <div>
                    <el-checkbox  v-for="(item,key) in allMenus" :key="key"  v-model="checked">
                        {{item.permissionDesc}}
                    </el-checkbox>
            </div>
        </el-dialog>
</template>
<script>
export default {
    props:['showaddrole'],
    data(){
        return {
            checked:true,
        }
    },
    methods:{
        handleClose(){
            this.$parent.showaddrole = false;
        }
    },
    computed:{
        allMenus(){
            return this.$store.getters.allMenus;
        }
    },
    mounted(){
        var usera = JSON.parse(localStorage.getItem('response')).permissions;
        console.log(usera);

    }
}
</script>
<style lang="scss" scoped>

</style>

